package alp.starcode.nudtportal.framework.mybatis.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * operate_log（用户操作日志表）
 * </p>
 *
 * @author xwx
 * @since 2023-08-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("operate_log")
@ApiModel(value = "OperateLog对象", description = "operate_log（用户操作日志表）")
public class OperateLog extends Model<OperateLog> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "操作日志Uuid")
    @TableId("operate_log_id")
    private String operateLogId;

    @ApiModelProperty(value = "用户流水号")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "操作时间")
    @TableField("operate_time")
    private Long operateTime;

    @ApiModelProperty(value = "对象类型")
    @TableField("object_type")
    private String objectType;

    @ApiModelProperty(value = "操作类型")
    @TableField("operate_type")
    private String operateType;

    @ApiModelProperty(value = "操作用户")
    @TableField("operate_user")
    private String operateUser;

    @ApiModelProperty(value = "ip地址")
    @TableField("ip_address")
    private String ipAddress;

    @ApiModelProperty(value = "操作内容")
    @TableField("operate_before_content")
    private String operateBeforeContent;

    @ApiModelProperty(value = "执行方法")
    @TableField("execute_method")
    private String executeMethod;

    @TableField("server_ip_address")
    private String serverIpAddress;

    @TableField("operate_after_content")
    private String operateAfterContent;


    @Override
    protected Serializable pkVal() {
        return this.operateLogId;
    }

}
